package com.farm.wcp.wsch;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.lang.StringUtils;

/**
 * 索引封装对象 APPID : 文档ID, APPKEYID : 业务KEYID, POPKEYS : 权限KEY, TITLE : 标题名称, //
 * CONTENTS : 正文简介, // TYPETITLE : 分类名称, // TREECODE : 分类TREECODE, // ETIME :
 * 更新时间, // AUTHOR : 作者, // TAG : 标签, // IMGURL : 预览图
 * 
 * @author macpl
 *
 */
public class WschIndex {

//	fields.add(new WDocField("文档ID", "APPID", true, WDocField.TYPES.StringField, 1, WDocField.TEXTTYPES.text,
//			WDocField.SEARCHTYPES.none, WDocField.SORTABLES.none, 1, 128));
	private String APPID;

//
//	fields.add(new WDocField("业务KEYID", "APPKEYID", true, WDocField.TYPES.StringField, 2, WDocField.TEXTTYPES.text,
//			WDocField.SEARCHTYPES.none, WDocField.SORTABLES.none, 1, 128));
	private String APPKEYID;
//
//	fields.add(new WDocField("权限KEY", "POPKEYS", true, WDocField.TYPES.TextField, 3, WDocField.TEXTTYPES.text,
//			WDocField.SEARCHTYPES.none, WDocField.SORTABLES.none, 1, 1024));
	private String POPKEYS;
//
//	fields.add(new WDocField("标题名称", "TITLE", true, WDocField.TYPES.TextField, 4, WDocField.TEXTTYPES.text,
//			WDocField.SEARCHTYPES.key, WDocField.SORTABLES.none, 2, 1024));
	private String TITLE;
//
//	fields.add(new WDocField("正文简介", "CONTENTS", true, WDocField.TYPES.TextField, 5, WDocField.TEXTTYPES.html,
//			WDocField.SEARCHTYPES.key, WDocField.SORTABLES.none, 1, 1024));
	private String CONTENTS;
//
//	fields.add(new WDocField("分类名称", "TYPETITLE", true, WDocField.TYPES.TextField, 6, WDocField.TEXTTYPES.text,
//			WDocField.SEARCHTYPES.key, WDocField.SORTABLES.none, 1, 1024));
	private String TYPETITLE;
//
//	fields.add(new WDocField("分类TREECODE", "TREECODE", true, WDocField.TYPES.TextField, 7, WDocField.TEXTTYPES.text,
//			WDocField.SEARCHTYPES.none, WDocField.SORTABLES.none, 1, 1024));
	private String TREECODE;
//
//	fields.add(new WDocField("更新时间", "ETIME", true, WDocField.TYPES.TextField, 8, WDocField.TEXTTYPES.text,
//			WDocField.SEARCHTYPES.none, WDocField.SORTABLES.sort, 1, 64));
	private String ETIME;
//
//	fields.add(new WDocField("作者", "AUTHOR", true, WDocField.TYPES.TextField, 9, WDocField.TEXTTYPES.text,
//			WDocField.SEARCHTYPES.none, WDocField.SORTABLES.none, 1, 256));
	private String AUTHOR;
//
//	fields.add(new WDocField("标签", "TAG", true, WDocField.TYPES.TextField, 10, WDocField.TEXTTYPES.text,
//			WDocField.SEARCHTYPES.key, WDocField.SORTABLES.none, 2, 256));
	private String TAG;
//	fields.add(new WDocField("预览图", "IMGURL", true, WDocField.TYPES.TextField, 11, WDocField.TEXTTYPES.text,
//			WDocField.SEARCHTYPES.none, WDocField.SORTABLES.none, 1, 512));
	private String IMGID;

	private String CLASSID;

	private String IMGSECRET;

	

	public String getCLASSID() {
		return CLASSID;
	}

	public void setCLASSID(String cLASSID) {
		CLASSID = cLASSID;
	}

	public String getIMGSECRET() {
		return IMGSECRET;
	}

	public void setIMGSECRET(String iMGSECRET) {
		IMGSECRET = iMGSECRET;
	}

	public String getAPPID() {
		return APPID;
	}

	public void setAPPID(String aPPID) {
		APPID = aPPID;
	}

	public String getAPPKEYID() {
		return APPKEYID;
	}

	public void setAPPKEYID(String aPPKEYID) {
		APPKEYID = aPPKEYID;
	}

	public String getPOPKEYS() {
		return POPKEYS;
	}

	public void setPOPKEYS(String pOPKEYS) {
		POPKEYS = pOPKEYS;
	}

	public String getTITLE() {
		return TITLE;
	}

	public void setTITLE(String tITLE) {
		TITLE = tITLE;
	}

	public String getCONTENTS() {
		return CONTENTS;
	}

	public void setCONTENTS(String cONTENTS) {
		CONTENTS = cONTENTS;
	}

	public String getTYPETITLE() {
		return TYPETITLE;
	}

	public void setTYPETITLE(String tYPETITLE) {
		TYPETITLE = tYPETITLE;
	}

	public String getTREECODE() {
		return TREECODE;
	}

	public void setTREECODE(String tREECODE) {
		TREECODE = tREECODE;
	}

	public String getETIME() {
		return ETIME;
	}

	public void setETIME(String eTIME) {
		ETIME = eTIME;
	}

	public String getAUTHOR() {
		return AUTHOR;
	}

	public void setAUTHOR(String aUTHOR) {
		AUTHOR = aUTHOR;
	}

	public String getTAG() {
		return TAG;
	}

	public void setTAG(String tAG) {
		TAG = tAG;
	}

	public String getIMGID() {
		return IMGID;
	}

	public void setIMGID(String iMGID) {
		IMGID = iMGID;
	}

	public Map<String, String> getMap() {
		Map<String, String> map = new HashMap<>();
		if (StringUtils.isNotBlank(APPID)) {
			map.put("APPID", APPID);
		}
		if (StringUtils.isNotBlank(APPKEYID)) {
			map.put("APPKEYID", APPKEYID);
		}
		if (StringUtils.isNotBlank(POPKEYS)) {
			map.put("POPKEYS", POPKEYS);
		}
		if (StringUtils.isNotBlank(TITLE)) {
			map.put("TITLE", TITLE);
		}
		if (StringUtils.isNotBlank(CONTENTS)) {
			map.put("CONTENTS", CONTENTS);
		}
		if (StringUtils.isNotBlank(TYPETITLE)) {
			map.put("TYPETITLE", TYPETITLE);
		}
		if (StringUtils.isNotBlank(TREECODE)) {
			map.put("TREECODE", TREECODE);
		}
		if (StringUtils.isNotBlank(ETIME)) {
			map.put("ETIME", ETIME);
		}
		if (StringUtils.isNotBlank(AUTHOR)) {
			map.put("AUTHOR", AUTHOR);
		}
		if (StringUtils.isNotBlank(TAG)) {
			map.put("TAG", TAG);
		}
		if (StringUtils.isNotBlank(IMGID)) {
			map.put("IMGID", IMGID);
		}
		
		if (StringUtils.isNotBlank(IMGID)) {
			map.put("IMGID", IMGID);
		}
		if (StringUtils.isNotBlank(IMGID)) {
			map.put("IMGID", IMGID);
		}
		if (StringUtils.isNotBlank(CLASSID)) {
			map.put("CLASSID", CLASSID);
		}
		if (StringUtils.isNotBlank(IMGSECRET)) {
			map.put("IMGSECRET", IMGSECRET);
		}
		return map;
	}
}
